<template>
  <div class="imgSize">
  <swiper :options="swiperOption"  >
    <!-- slides -->
    <swiper-slide v-for="item of list"
                  :key="item.id"
    >
      <img :src="item.imgUrl" class="setImg">
    </swiper-slide>
    <div class="swiper-pagination" slot="pagination"></div>
  </swiper>
  </div>
</template>
<script>
export default {
  name: 'HomeSwiper',
  props: {
    list : Array
  },
  data: function () {
    return {
      swiperOption: {
        pagination: '.swiper-pagination',
        spaceBetween: 30,
        effect: 'fade',
         // loop: true    循环出bug
      }
     }
    }

}
</script>
<style scoped>
  .swiper-pagination {
    color: white;
    }
 .setImg {
   width:100%;
   height: 150px;
   margin-top: 64px;
 }
</style>

